import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'BasicData_Department'

export interface DepartmentParam {
  id: string;
  PageSize: string;
  PageIndex: string;
  DepartmentNo: string;
  DepartmentName: string;
  GoodsReceipttimeEnd: object;
  GoodsReceipttimeStart: object;
}


// 获取部门列表
export function ApiGetBasicData_DepartmentPageListAsync(param: DepartmentParam) {
  return httpRequest({
    url: `${modules.basicdataModuleUrl}/Department/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除部门
export function ApiBatchDeletionBasicData_DepartmentAsync(param: DepartmentParam) {
  return httpRequest({
    url: `${modules.basicdataModuleUrl}/Department/BatchDeletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加部门
export function ApiCreateBasicData_DepartmentAsync(param: DepartmentParam) {
  return httpRequest({
    url: `${modules.basicdataModuleUrl}/Department/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加部门
export function ApiUpdateBasicData_DepartmentAsync(param: DepartmentParam) {
  return httpRequest({
    url: `${modules.basicdataModuleUrl}/Department/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}